import * as React from "react";

import Student from '../common/Student';

export interface EditorProps { compiler: string; framework: string; }

// interface 用于定义类型。可以不必使用implements
interface Person {
    firstName: string;
    lastName: string;
}

export class Editor extends React.Component <EditorProps, {}> {

    constructor(props: EditorProps) {
        super(props);
    }

    printThings(value: string) {
        console.log(value)
    }

    printPerson(person: Person) {
        console.log(person);
    }

    test() {
        enum Color {Red = 1, Green = 2, Blue = 4}
let c: Color = Color.Green;
        console.log(c);

        let colorName: string = Color[2];
        console.log(colorName);
        console.log(Color[2], Color[3], Color[4]);
    }

    render() {
        // this.printThings('test type!');
        this.test();

        return <div>Editor</div>;
    }
}